package org.ohuyo.libra.client.slave.webapp.actions;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.ohuyo.libra.client.session.LibraSession;
import org.ohuyo.libra.client.session.LibraSessionUtils;

import com.opensymphony.xwork2.ActionSupport;

@Action("/slave/libraSession")
@Result(name = "success", location = "/slave/libraSession.jsp")
public class libraSessionAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7993143495988221135L;
	private LibraSession libraSession;

	public String execute() throws Exception {
		HttpServletRequest req = ServletActionContext.getRequest();
		libraSession = LibraSessionUtils.getSession(req);
		return super.execute();
	}

	public LibraSession getLibraSession() {
		return libraSession;
	}
}